<?php get_header(); ?>        
    

<div class="main_content padd">
    <div id="primary" <?php if(get_option('pr_sr_ly')=='true'){echo 'class="full_width"'; } ?>>       
<?php   
        if (have_posts()) : while (have_posts()) : the_post();   
        
global $custom_metabox;
global $custom_metabox2;

$meta = get_post_meta(get_the_ID(), $custom_metabox->get_the_ID(), TRUE); 
$meta2 = get_post_meta(get_the_ID(), $custom_metabox2->get_the_ID(), TRUE);

?>
<div class="review_single">
                <div class="review_bar <?php if(get_option('pr_sr_ly')=='true'){echo 'extra_width'; } ?>">
                    <h2><?php echo $meta['r_title']; ?></h2>
                    <div class="review_rating stars_<?php echo $meta['r_rating']; ?>"><?php echo $meta['r_rating']; ?>stars</div>
                </div><!--end review_bar-->
                <h1 class="prod_title"><?php the_title(); ?></h1>
                <div class="preload_image">
                    <a class="single_image" href="<?php echo $meta['r_aff_link']; ?>" rel="nofollow" target="_blank"><img src="<?php print_thumbnail_src('280','180') ?>" alt="single_review" /></a>
                </div><!--end preload-->
                <?php if(!$meta['r_overview']) : ?>
                <div class="brief">
                    <p class="meta"><?php echo get_the_term_list( get_the_ID(), 'review-cats', '', ',', '' ) ?> | <g:plusone size="small"></g:plusone></p>
                    <?php if($meta['r_price']) : ?><p class="price">Price: <?php echo $meta['r_price']; ?></p><?php endif; ?>
                    <p><?php echo $meta['r_description']; ?></p>
                  <!--<a href="<?php echo $meta['r_aff_link']; ?>" class="visit" rel="nofollow" target="_blank">View Coupon</a>
                -->

               <!-- <?php echo do_shortcode("[\"$meta[r_aff_link]\"]"); ?><br>-->
               <!--  <?php echo do_shortcode("[peel_testname]"); ?><br> -->
               <!--  <?php echo do_shortcode("[coupon code='greensmoke2' /]"); ?><br>-->

                
                
<!-- <div style="float: left;">                                                 
   <div class="coupon_title3"></div>-->
<div class="dscount"><a href="/greensmoke""><?php echo $meta['r_aff_link']; ?></a></div>
<div class="dscount">10% discount </div>

<div id="uniquename2" class="dscount"">
<a href="/Greensmoke" onclick="javascript:HideContent('uniquename2') ;ShowContent('uniquename')" target="blank"><img src="http://www.ecigadvanced.com/wp-content/themes/Ecig_newtheme/images/show_coupon.jpg"</img>
</a></div>       

<div id="uniquename" style="display:none;">                             
<div class="coupon_home showcoupon" style="margin-top: 0px; width: 152px; text-align: left;">
<div id="show" class=""><a target="_blank" title="Click to open our affiliate site for your price" href="/Greensmoke"><span style="font-size: 11px ! important;">Coupon Code:</span><br/>disc10-25830<br/><span style="font-size: 10px ! important;">Click to Open</span></a></div></div>
</div>




                  </div><!--end brief-->
                <div class="clear"></div>
                <?php endif; ?>
                <?php the_content(); ?>
<?php if($meta2){?>                                
<div class="conclusion_table">
                    <div class="table_top">
                        <span class="cl">Conclusion</span>
                        <span class="rat">Rating</span>
                    </div><!--end table_top-->
                
<?php
foreach ($meta2['c_group'] as $conclusion)
{
;
?>
                    
                    <div class="t_row">
                    <div class="table_left">
                    <?php echo $conclusion['c_title']; ?>
                    </div><!--end table_left-->
                    <div class="table_right review_rating stars_<?php echo $conclusion['c_rating']; ?>"><?php echo $conclusion['c_rating']; ?> stars
                    </div><!--end table_right-->
                    </div><!--end t_row-->
<?php } ?>                
                    
                    
                </div><!--end conclusion table-->
                
<?php  } 
$review_tags= get_the_term_list( get_the_ID(), 'review-tags', '', ',', '' ); if($review_tags): ?>  <p class="meta tags">Tags : <?php echo $review_tags;  ?> </p>   <?php endif; ?>
            </div><!--end review_single-->
<?php  endwhile; endif; ?>      

<div id="comments_template">
<?php comments_template(); ?>
</div>  
        </div><!--end primary-->
        
<?php if(get_option('pr_sr_ly')!='true'){ get_sidebar(); } ?>

        </div><!--end main_content-->
        
<?php get_footer(); ?>